﻿using System.Text;

namespace Wechat.Results
{
    /// <summary>
    /// 图片回复
    /// </summary>
    public class WechatImageResult : WechatResult
    {
        public WechatImageResult(string toUsername, string fromUsername)
            : base(toUsername, fromUsername)
        {

        }

        /// <summary>
        /// 媒体文件标识
        /// </summary>
        public string MediaId { get; set; }

        protected override void Format(StringBuilder builder)
        {
            builder.Append("<MsgType><![CDATA[image]]></MsgType>");

            builder.AppendFormat("<Image><MediaId><![CDATA[{0}]]></MediaId></Image>", MediaId);
        }
    }
}
